<?php
class Paket_Makan extends CI_Model {
	function __construct() {
		parent::__construct();
	}
	
	function get($where = NULL){
		if($where != NULL){
			$this->db->where($where);
		}
		$this->db->from('paket_makan');
		$this->db->order_by('nama');
		return $this->db->get();
	}
	
	function add($data){
		$this->db->insert('paket_makan',$data);
		return $this->db->insert_id();
	}
	
	function edit($id,$data){
		$this->db->where('id_paket',$id);
		return $this->db->update('paket_makan',$data);
	}
	
	function delete($id){
		$this->db->where('id_paket',$id);
		return $this->db->delete('paket_makan');
	}
	
}